<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#box{
				width: 400px;
				height: 350px;
				background-color: hotpink;
				position: absolute;
				display: none;
			}
		</style>
	</head>
	<body>
		<button type="button">弹出</button>
		<div id="box">
			
		</div>
	</body>
</html>
<script src="2弹出框插件.js"></script>
<script>
	let oBox = document.querySelector("#box");
	
	let pb = new PopBox(oBox);
	
	let oBtn = document.querySelector("button");
	
	oBtn.onclick = function(){
		pb.setPosition();
	}
	
</script>